package com.example.demo.controller;

import com.example.demo.annotation.Api;
import com.example.demo.domain.exam.Malpractice;
import com.example.demo.domain.exam.QueryModel;
import com.example.demo.domain.exam.condition.ExamMalpracticeCondition;
import com.example.demo.service.exam.ExamMalpracticeService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/exam/malpractice")
@RequiredArgsConstructor
public class ExamMalpracticeController {

    private final ExamMalpracticeService examMalpracticeService;

    @Api
    @RequestMapping(value = "/page", method = RequestMethod.GET)
    public List<Malpractice> page(@RequestBody QueryModel<ExamMalpracticeCondition> query) {
        return examMalpracticeService.page(query);
    }

    @Api
    @RequestMapping(value = "/export", method = RequestMethod.POST)
    public void doExport() {

    }

}
